package com.neusoft.elmboot.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot.po.OrderDetailet;
import com.neusoft.elmboot.service.OrderDetailetService;

@RestController
@RequestMapping("/OrderDetailet")
public class OrderDetailetController {
    @Autowired
	private OrderDetailetService orderDetailetService;

    @RequestMapping(value = "/orderId/{orderId}", method = RequestMethod.GET)
	public List<OrderDetailet> listOrdersByOrders(@PathVariable("orderId") Integer orderId) throws Exception{
		return orderDetailetService.listOrderDetailetByOrderId(orderId);
	}
}
